import { oops } from "db://oops-framework/core/Oops";
import { PluginBase } from "./PluginBase";

/*
 * @Author: CB
 * @Date: 2023-08-01 10:46:48
 * @Description: 广告管理基类
 */
export class PluginAds extends PluginBase {

    /** 显示banner广告 */
    showBannerAD(bannerId?: string, height?: number) {
        oops.gui.toast('showBannerAD');
    }

    /** 隐藏banner广告 */
    hideBannerAD() {
        oops.gui.toast('hideBannerAD');
    }

    /** 显示激励视频广告 */
    showRewardAD(finishCallback?: (success: boolean) => void, errorCallback?: (error: string) => void) {
        oops.gui.toast('showRewardAD');
        finishCallback && finishCallback(true);
    }

    /** 创建插屏广告 */
    createInterstitialAD(adId: string) {
        oops.gui.toast('createInterstitialAD');
    }

    /** 显示插屏广告 */
    showInterstitialAd(callback?: () => void) {
        oops.gui.toast('showInterstitialAd');
    }


}